package com.elder.business.service;

import com.alibaba.fastjson2.JSONObject;
import com.elder.business.domain.MedicationRecords;
import com.elder.business.domain.MedicationRecordsDTO;
import com.elder.common.core.domain.AjaxResult;
import com.elder.common.core.page.TableDataInfo;

import java.util.List;

/**
 * 用药记录Service接口
 * 
 * @author elder
 * @date 2024-04-11
 */
public interface IMedicationRecordsService 
{
    /**
     * 查询用药记录
     * 
     * @param id 用药记录主键
     * @return 用药记录
     */
    public JSONObject selectMedicationRecordsById(Long id);

    /**
     * 查询用药记录列表
     * 
     * @param medicationRecords 用药记录
     * @return 用药记录集合
     */
    public List<MedicationRecords> selectMedicationRecordsList(MedicationRecords medicationRecords);

    /**
     * 新增用药记录
     * 
     * @param medicationRecords 用药记录
     * @return 结果
     */
    public int insertMedicationRecords(MedicationRecordsDTO medicationRecords);

    /**
     * 修改用药记录
     * 
     * @param medicationRecords 用药记录
     * @return 结果
     */
    public int updateMedicationRecords(MedicationRecordsDTO medicationRecords);

    /**
     * 批量删除用药记录
     * 
     * @param ids 需要删除的用药记录主键集合
     * @return 结果
     */
    public int deleteMedicationRecordsByIds(Long[] ids);

    /**
     * 删除用药记录信息
     * 
     * @param id 用药记录主键
     * @return 结果
     */
    public int deleteMedicationRecordsById(Long id);

    TableDataInfo getMedicationRecordsList(String elderName, String drugName, String startTime,String endTime, Integer pageNum, Integer pageSize);

    TableDataInfo getNurseElderList(Long userId, String elderName, Integer pageNum, Integer pageSize);

    AjaxResult nurseMedicationFinish(Long userId, Long elderId, String drugNames, String timeBucket);
}
